home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 May / Chip Mayıs 2001.iso / prog / share / 07 / ASPFusion / data1.cab / Script_Pages / Scripts / vdirdel.vbs < prev   
Encoding:
Text File  |  2001-03-25  |  789 b   |  22 lines

  1. '-------------------------------------------------------------------------------------
  2. ' Program to create the virtual directory during installation
  3. ' Author :    ASPFusion Support
  4. ' Company :    Advanced Communications    
  5. '-------------------------------------------------------------------------------------
  6. Option Explicit
  7. on error resume next
  8. dim iisObj2,VDir
  9. dim oArgs
  10. set iisObj2 = GetObject("IIS://localhost/w3svc/1/ROOT")
  11. Set oArgs = WScript.Arguments
  12. if (oArgs.Count < 1) then
  13.     WScript.Echo "Invalid no of arguments" & CStr(oArgs.Count)
  14. else
  15.     VDir = trim(oArgs(0))
  16.     iisObj2.Delete "IIsWebVirtualDir", VDir    
  17.     if (Err.number <> 0) then
  18.         Wscript.echo "unable to delete the virtual directory " + VDir + "Error is " + Err.description
  19.     end if
  20. end if
  21. set iisObj2 = Nothing
  22.